package com.huiyeji.dynamic.core.bean;

import com.huiyeji.dynamic.core.annotations.DynamicBean;
import com.huiyeji.dynamic.core.annotations.DynamicMethod;

@Deprecated
@DynamicBean("timer")
public class DynamicTimer {

    private long beginStamp;

    private long endStamp;

    @DynamicMethod
    public void begin(){
        this.beginStamp = System.currentTimeMillis();
    }

    @DynamicMethod
    public void end(){
        this.endStamp = System.currentTimeMillis();
    }

    @DynamicMethod
    public long get(){
        return this.endStamp - this.beginStamp;
    }
}
